/*
 * Copyright (c) 2025 HiSilicon (Shanghai) Technologies Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __AF_MONITOR_H__
#define __AF_MONITOR_H__

#include "ot_type.h"
#include "af_common.h"
#include "ss_af_manager.h"
#include "ss_scene_detection.h"

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif /* __cplusplus */

/* AF MONITOR Operation */
td_void *AF_MONITOR_Init(const OT_AF_InitParam *initParam, td_void *capabilityHandle);
td_s32 AF_MONITOR_SetDynamicTuning(td_void *handle, OT_AF_DynamicTuningInfo dynamicTuning);
td_s32 AF_MONITOR_SetFocusWindow(td_void *handle, const OT_AF_WindowConfig *winConfig);
td_s32 AF_MONITOR_GetFocusWindow(td_void *handle, OT_AF_WindowConfig *winConfig);
td_s32 AF_MONITOR_SetExhibitMode(td_void *handle, td_bool enable);
td_s32 AF_MONITOR_SetMode(td_void *handle, OT_AF_Mode mode);
td_s32 AF_MONITOR_GetMode(td_void *handle, OT_AF_Mode *mode);
td_s32 AF_MONITOR_RegisterCb(td_void *handle, OT_AF_Callback *cb);

td_s32 AF_MONITOR_SetSceneDetectionIntf(td_void *handle, OT_AF_SceneDetectionIntf *obj);

td_s32 AF_MONITOR_Run(td_void *handle);
td_s32 AF_MONITOR_Lock(td_void *handle);
td_s32 AF_MONITOR_UnLock(td_void *handle);

td_s32 AF_MONITOR_Trigger(td_void *handle);

td_s32 AF_MONITOR_Stop(td_void *handle);
td_s32 AF_MONITOR_Deinit(td_void *handle);

td_void AF_MONITOR_UpdateCapabilityHandle(td_void *handle, td_void *capabilityHandle);
td_s32 AF_MONITOR_UpdateFocusMotorIntf(td_void *handle, const OT_AF_FocusMotorAlgIntf *intf);
td_s32 AF_MONITOR_SetTriggerPadPushFunc(td_void *handle, OT_AF_COMMON_PadFunc *func);
td_s32 AF_MONITOR_SetZoomInfo(td_void *handle, const OT_AF_ZoomInfo *info);
td_s32 AF_MONITOR_GetZoomInfo(td_void *handle, OT_AF_ZoomInfo *info);
td_s32 AF_MONITOR_GetCurState(td_void *handle, OT_AF_State *curState);
td_s32 AF_MONITOR_GetValidRange(td_void *handle, OT_AF_TuningFocusSearchLimits *range);

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* __cplusplus */

#endif /* __SS_MPI_ISP_H__ */
